package com.tempjob.common.businesss.mongo.entity;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.FieldFill;
import com.anwen.mongo.enums.IdTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Version;

import java.util.Date;
import java.util.List;

/**
 * @author hui
 * @Date 2024/11/4 15:58
 **/

@CollectionName(value = "company_info")
@Data
public class CompanyInfo {

    @ID(type = IdTypeEnum.OBJECT_ID)
    @CollectionField("_id")
    @ApiModelProperty("id")
    private String id;

    @CollectionField("user_id")
    @ApiModelProperty("用户id")
    private String userId;

    @CollectionField("type")
    @ApiModelProperty("类型：1公司2企业")
    private Integer type;

    @CollectionField("social_credit_code")
    @ApiModelProperty("统一社会信用代码")
    private String socialCreditCode;

    @CollectionField("industry_category")
    @ApiModelProperty("所属行业编码")
    private String industryCategory;

    @CollectionField("industry_category_name")
    @ApiModelProperty("所属行业")
    private String industryCategoryName;

    @CollectionField("conpany_name")
    @ApiModelProperty("公司名称")
    private String companyName;

    @CollectionField("company_type")
    @ApiModelProperty("公司类型")
    private String companyType;

    @CollectionField("register_address")
    @ApiModelProperty("住所")
    private String registerAddress;

    @CollectionField("legal_person")
    @ApiModelProperty("法人")
    private String legalPerson;

    @CollectionField("registered_capital")
    @ApiModelProperty("注册资本")
    private String registeredCapital;

    @CollectionField("register_date")
    @ApiModelProperty("成立日期")
    private String registerDate;

    @CollectionField("business_term")
    @ApiModelProperty("营业期限")
    private String businessTerm;

    @CollectionField("business_scope")
    @ApiModelProperty("经营范围")
    private String businessScope;


    @CollectionField("company_status")
    @ApiModelProperty("公司状态:2黑名单")
    private Integer companyStatus;

    @CollectionField("company_level")
    @ApiModelProperty("公司等级")
    private Integer companyLevel;

    @CollectionField("company_scale")
    @ApiModelProperty("公司规模")
    private String companyScale;

    @CollectionField("company_desc")
    @ApiModelProperty("公司简介")
    private String companyDesc;

    @CollectionField("desc_images")
    @ApiModelProperty("介绍图片")
    private List<String> descImages;

    @CollectionField("ico")
    @ApiModelProperty("ico")
    private String ico;

    @CollectionField("company_logo")
    @ApiModelProperty("logo")
    private String companyLogo;

    @CollectionField("longitude")
    @ApiModelProperty("经度")
    private Double longitude;

    @CollectionField("latitude")
    @ApiModelProperty("纬度")
    private Double latitude;

    @CollectionField("company_address")
    @ApiModelProperty("地址")
    private String companyAddress;

    @CollectionField("company_welfare")
    @ApiModelProperty("公司福利")
    private List<String> companyWelfare;

    @CollectionField("company_nature")
    @ApiModelProperty("公司性质")
    private String companyNature;

    @CollectionField(value = "oper_time", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    private Date operTime;

    @CollectionField(value = "oper_id", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新人id", hidden = true)
    private Long operId;

    @CollectionField(value = "oper_name", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新人", hidden = true)
    private String operName;

    @CollectionField(value = "create_id", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人id", hidden = true)
    private Long createId;

    @CollectionField(value = "create_name", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人", hidden = true)
    private String createName;

    @CollectionField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    @Version
    @CollectionField("version")
    @ApiModelProperty(value = "乐观锁", hidden = true)
    private Integer version;

}
